package com.lemon.cloud.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lemon.cloud.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
    * 公共参数配置表
    */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "sys_public_param")
public class SysPublicParam extends BaseEntity implements Serializable {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @Schema(description = "名称",minLength = 1,maxLength = 50)
    @TableField(value = "`name`")
    @NotEmpty(message = "名称不能为空")
    @Length(min = 1,max = 50,message = "名称长度为1~50字符")
    private String name;

    @Schema(description = "键值",minLength = 1,maxLength = 50)
    @TableField(value = "`key`")
    @NotEmpty(message = "键值不能为空")
    @Length(min = 1,max = 50,message = "键值长度为1~50字符")
    private String key;

    @Schema(description = "值",minLength = 1,maxLength = 100)
    @TableField(value = "`value`")
    @NotEmpty(message = "值不能为空")
    @Length(min = 1,max = 100,message = "值长度为1~100字符")
    private String value;

    @Schema(description = "状态")
    @TableField(value = "`status`")
    private String status;

    @Schema(description = "校验码")
    @TableField(value = "validate_code")
    private String validateCode;

    @Schema(description = "类型")
    @TableField(value = "`type`")
    @NotEmpty(message = "类型不能为空")
    private String type;

    @Schema(description = "系统标志")
    @TableField(value = "system_flag")
    @NotEmpty(message = "系统标志不能为空")
    private String systemFlag;

    private static final long serialVersionUID = 1L;
}
